﻿using System.ComponentModel.DataAnnotations;

namespace Model.DTO.Ware
{
    /// <summary>
    /// 编辑商品DTO
    /// </summary>
    public class EditWareDTO
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required]
        public long Id { get; set; }
        /// <summary>
        /// 商品名称(64)
        /// </summary>
        [Required, MaxLength(64,ErrorMessage = "商品名称长度不能超过64位")]
        public string WareName { get; set; }
        /// <summary>
        /// EAN13(13)
        /// </summary>
        [Required, MaxLength(13,ErrorMessage = "EAN13长度不能超过13位")]
        public string EAN13 { get; set; }
        /// <summary>
        /// 价格
        /// </summary>
        [Required]
        public decimal Price { get; set; }
        /// <summary>
        /// 原价
        /// </summary>
        [Required]
        public decimal OriginPrice { get; set; }
        /// <summary>
        /// 税率
        /// </summary>
        [Required]
        public double TaxRate { get; set; }
        /// <summary>
        /// 成本价
        /// </summary>
        [Required]
        public decimal CostPrice { get; set; }
        /// <summary>
        /// 状态Id
        /// </summary>
        [Required]
        public int StateId { get; set; }
        /// <summary>
        /// 备注(128)
        /// </summary>
        [MaxLength(128, ErrorMessage = "备注长度不能超过128位")]
        public string? Remark { get; set; }
        /// <summary>
        /// 描述(128)
        /// </summary>
        [MaxLength(128,ErrorMessage = "描述长度不能超过128位")]
        public string? Description { get; set; }
        /// <summary>
        /// 品牌ID
        /// </summary>
        public int? BrandId { get; set; }
        /// <summary>
        /// 制造商ID
        /// </summary>
        public int? ManufacturerId { get; set; }
        /// <summary>
        /// 供应商ID
        /// </summary>
        public int? SupplierId { get; set; }
        /// <summary>
        /// 折扣
        /// </summary>
        public double Discount { get; set; }
        /// <summary>
        /// 下架时间
        /// </summary>
        public DateTime RemoveDate { get; set; }
    }
}
